home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 09 - 1993 / 09.06 Jun 93 / TReportPrinter / TReportPrinter.h < prev   
Encoding:
C/C++ Source or Header  |  1992-11-01  |  2.0 KB  |  69 lines  |  [TEXT/MPS ]

  1. #ifndef __REPORTPRINTER__
  2. #define __REPORTPRINTER__ 1
  3. #include <Printing.h>
  4.  
  5. const    short    kStatusWindowView = 2000;
  6. const    IDType    kDocumentNameID = 'VW08';
  7.  
  8. class TReportStatusWindow;
  9.  
  10. class TReportPrinter: public TObject {
  11.   private:
  12.       Boolean    fPrintManagerIsOpen;
  13.   public:
  14.       CStr255    fCurrentFontName;
  15.     short    fCurrentFontNumber;
  16.     
  17.     long    fMaxSpoolLines;
  18.     long    fPrintedLines;
  19.  
  20.     
  21.     short    fCurrentFace;
  22.     short    fCurrentSize;
  23.     short    fLeftMargin;
  24.     short    fBottomOfPage;
  25.     Boolean    fAutoFormFeed;
  26.     Boolean    fUserAborted;
  27.     
  28.       TPPrPort    fPrintingPort;    // a pointer
  29.     THPrint        fPrintRecord;    // a handle
  30.     
  31.     TReportStatusWindow     *fMyStatusWindow;
  32.   
  33.       short        fCurrentPage;
  34.     CStr255        fReportTitle;
  35.  
  36.       virtual pascal void     IReportPrinter(CStr255 theFont, short theFace, short theSize, 
  37.                                             short leftMargin, short bottomOfPage,
  38.                                             Boolean autoFormFeed);
  39.     virtual pascal void        DoPrOpen(void);
  40.     virtual pascal void        DoPrClose(void);
  41.     virtual pascal void        SetFont(CStr255 theFont);
  42.     virtual pascal void        SetFace(short theFace);
  43.     virtual pascal void        SetSize(short theSize);
  44.     virtual pascal Boolean     StartReport(CommandNumber aCmdNumber);
  45.     virtual pascal Boolean     PrintALine(const CStr255 theLine, Boolean doLineFeed);
  46.     virtual pascal void     DoFormFeed(void);
  47.     virtual pascal Boolean    DoOpenPage(void);
  48.     virtual pascal void        DoClosePage(void);
  49.     virtual pascal void        VerticalTab(short pixels);
  50.     virtual pascal void        EndReport(void);
  51.     virtual pascal Boolean    HandlePageSetup(void);
  52.     virtual pascal void        PrintHeader(void);
  53.     virtual pascal void        PrintFooter(void);
  54.      virtual pascal void        Free(void);
  55.     virtual pascal unsigned long GetFreeSpaceOnDisk(int theVolume);
  56.     virtual pascal void        UserAbort(void);
  57.     virtual pascal void        SetDocumentName(CStr255 docName);
  58. };
  59.  
  60. class    TReportStatusWindow: public TWindow {
  61.   public:
  62.     virtual pascal void IReportStatusWindow(TReportPrinter *myPrinter);
  63.     virtual pascal void DoCommandKeyEvent(TToolboxEvent* event);
  64.     virtual pascal void SetMessage(CStr255 theMessage);
  65.   private:
  66.       TReportPrinter *fMyPrinter;
  67. };
  68.  
  69. #endif